// 红黄灯预警详情接口
import request from '@/utils/request'
import { commonBaseUrl } from '@/utils'

const moduleName = commonBaseUrl('A')

// 查询列表
export function queryEarlyWaring(data) {
    return request({
        url: moduleName + 'api/attachment/early/queryEarlyWaring',
        method: 'post',
        data,
        showLoading: true
    })
}

// 新增、修改接口
export function AddEditInfo(data) {
    return request({
        url: moduleName + 'api/attachment/early/addInfo',
        method: 'post',
        showLoading: true,
        data
    })
}

// 查询用户信息
export function queryUserInfo(params) {
    return request({
        url: moduleName + 'api/attachment/early/queryUserInfo',
        method: 'get',
        params
    })
}

//获取预警范围
export function queryEarly() {
    return request({
        url: moduleName + 'api/attachment/early/queryEarly',
        method: 'get'
    })
}

// 查询省份
export function queryProvince(params) {
    return request({
        url: moduleName + 'api/attachment/early/getProvinceInfo',
        method: 'get',
        params
    })
}

// 查询地市
export function queryCity(params) {
    return request({
        url: moduleName + 'api/attachment/early/getCityInfo',
        method: 'get',
        params
    })
}

// 删除列表数据
export function deleteEarlyWaring(data) {
    return request({
        url: moduleName + `api/attachment/early/deleteEarlyWaring`,
        method: 'post',
        data
    })
}